package gemini.pollux.ui.server.service.impl;

import gemini.basic.manager.DistributorManager;
import gemini.basic.model.Level;
import gemini.pollux.ui.client.service.LevelService;
import gemini.pollux.ui.server.service.AbstractSingleService;

import java.util.ArrayList;

public class LevelServiceImpl extends
        AbstractSingleService<DistributorManager> implements
        LevelService {

	@Override
	public ArrayList<Level> getAllLevels() {
		ArrayList<Level> result = duplicate(getServerManager().getAllLevels());
    	return result;
	}

	@Override
	public void deleteLevel(Integer id) {
		getServerManager().deleteLevel(id);
	}

	@Override
	public Level saveOrUpdateLevel(Level level) {
		Level result = duplicateExcludeFields(getServerManager().saveOrUpdateLevel(level));
    	return result;
	}
}
